﻿using SD.Common.PoweredByLee;
using SD.ContentSystem.Domain.Entities;
using SD.ContentSystem.IAppService.DTOs.Outputs;

namespace SD.ContentSystem.AppService.Maps
{
    /// <summary>
    /// 消息映射工具类
    /// </summary>
    public static class MessageMap
    {
        #region # 消息映射 —— static MessageInfo ToDTO(this Message message)
        /// <summary>
        /// 消息映射
        /// </summary>
        /// <param name="message">消息领域模型</param>
        /// <returns>消息数据传输对象</returns>
        public static MessageInfo ToDTO(this Message message)
        {
            MessageInfo messageInfo = Transform<Message, MessageInfo>.Map(message);

            return messageInfo;
        }
        #endregion
    }
}